3.276 \(\int (d+e x+f x^2)^p (-2 c e^2+2 c d f-c e^2 p+2 c f^2 (3+2 p) x^2) \, dx\)

Optimal. Leaf size=46 \[ 2 c f x \left (d+e x+f x^2\right )^{p+1}-\frac {c e (p+2) \left (d+e x+f x^2\right )^{p+1}}{p+1} \]

[Out]

-c*e*(2+p)*(f*x^2+e*x+d)^(1+p)/(1+p)+2*c*f*x*(f*x^2+e*x+d)^(1+p)

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {1661, 629} \[ 2 c f x \left (d+e x+f x^2\right )^{p+1}-\frac {c e (p+2) \left (d+e x+f x^2\right )^{p+1}}{p+1} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x + f*x^2)^p*(-2*c*e^2 + 2*c*d*f - c*e^2*p + 2*c*f^2*(3 + 2*p)*x^2),x]

[Out]

-((c*e*(2 + p)*(d + e*x + f*x^2)^(1 + p))/(1 + p)) + 2*c*f*x*(d + e*x + f*x^2)^(1 + p)

Rule 629

Int[((d_) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d*(a + b*x + c*x^2)^(p +
 1))/(b*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 1661

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expo
n[Pq, x]]}, Simp[(e*x^(q - 1)*(a + b*x + c*x^2)^(p + 1))/(c*(q + 2*p + 1)), x] + Dist[1/(c*(q + 2*p + 1)), Int
[(a + b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + p)*x^(q - 1) - c*e*(q +
 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]

Rubi steps

\begin {align*} \int \left (d+e x+f x^2\right )^p \left (-2 c e^2+2 c d f-c e^2 p+2 c f^2 (3+2 p) x^2\right ) \, dx &=2 c f x \left (d+e x+f x^2\right )^{1+p}+\frac {\int \left (-c e^2 f (2+p) (3+2 p)-2 c e f^2 (2+p) (3+2 p) x\right ) \left (d+e x+f x^2\right )^p \, dx}{f (3+2 p)}\\ &=-\frac {c e (2+p) \left (d+e x+f x^2\right )^{1+p}}{1+p}+2 c f x \left (d+e x+f x^2\right )^{1+p}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 34, normalized size = 0.74 \[ \frac {c (2 f (p+1) x-e (p+2)) (d+x (e+f x))^{p+1}}{p+1} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x + f*x^2)^p*(-2*c*e^2 + 2*c*d*f - c*e^2*p + 2*c*f^2*(3 + 2*p)*x^2),x]

[Out]

(c*(-(e*(2 + p)) + 2*f*(1 + p)*x)*(d + x*(e + f*x))^(1 + p))/(1 + p)

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 83, normalized size = 1.80 \[ \frac {{\left (c e f p x^{2} - c d e p + 2 \, {\left (c f^{2} p + c f^{2}\right )} x^{3} - 2 \, c d e - {\left (2 \, c e^{2} - 2 \, c d f + {\left (c e^{2} - 2 \, c d f\right )} p\right )} x\right )} {\left (f x^{2} + e x + d\right )}^{p}}{p + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)^p*(-2*c*e^2+2*c*d*f-c*e^2*p+2*c*f^2*(3+2*p)*x^2),x, algorithm="fricas")

[Out]

(c*e*f*p*x^2 - c*d*e*p + 2*(c*f^2*p + c*f^2)*x^3 - 2*c*d*e - (2*c*e^2 - 2*c*d*f + (c*e^2 - 2*c*d*f)*p)*x)*(f*x
^2 + e*x + d)^p/(p + 1)

________________________________________________________________________________________

giac [B]  time = 0.24, size = 191, normalized size = 4.15 \[ \frac {2 \, {\left (f x^{2} + x e + d\right )}^{p} c f^{2} p x^{3} + 2 \, {\left (f x^{2} + x e + d\right )}^{p} c f^{2} x^{3} + {\left (f x^{2} + x e + d\right )}^{p} c f p x^{2} e + 2 \, {\left (f x^{2} + x e + d\right )}^{p} c d f p x + 2 \, {\left (f x^{2} + x e + d\right )}^{p} c d f x - {\left (f x^{2} + x e + d\right )}^{p} c p x e^{2} - {\left (f x^{2} + x e + d\right )}^{p} c d p e - 2 \, {\left (f x^{2} + x e + d\right )}^{p} c x e^{2} - 2 \, {\left (f x^{2} + x e + d\right )}^{p} c d e}{p + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)^p*(-2*c*e^2+2*c*d*f-c*e^2*p+2*c*f^2*(3+2*p)*x^2),x, algorithm="giac")

[Out]

(2*(f*x^2 + x*e + d)^p*c*f^2*p*x^3 + 2*(f*x^2 + x*e + d)^p*c*f^2*x^3 + (f*x^2 + x*e + d)^p*c*f*p*x^2*e + 2*(f*
x^2 + x*e + d)^p*c*d*f*p*x + 2*(f*x^2 + x*e + d)^p*c*d*f*x - (f*x^2 + x*e + d)^p*c*p*x*e^2 - (f*x^2 + x*e + d)
^p*c*d*p*e - 2*(f*x^2 + x*e + d)^p*c*x*e^2 - 2*(f*x^2 + x*e + d)^p*c*d*e)/(p + 1)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 39, normalized size = 0.85 \[ -\frac {\left (-2 f p x +e p -2 f x +2 e \right ) c \left (f \,x^{2}+e x +d \right )^{p +1}}{p +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^2+e*x+d)^p*(-2*c*e^2+2*c*d*f-c*e^2*p+2*c*f^2*(3+2*p)*x^2),x)

[Out]

-c*(f*x^2+e*x+d)^(p+1)*(-2*f*p*x+e*p-2*f*x+2*e)/(p+1)

________________________________________________________________________________________

maxima [A]  time = 0.58, size = 66, normalized size = 1.43 \[ \frac {{\left (2 \, c f^{2} {\left (p + 1\right )} x^{3} + c e f p x^{2} - c d e {\left (p + 2\right )} - {\left (e^{2} {\left (p + 2\right )} - 2 \, d f {\left (p + 1\right )}\right )} c x\right )} {\left (f x^{2} + e x + d\right )}^{p}}{p + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)^p*(-2*c*e^2+2*c*d*f-c*e^2*p+2*c*f^2*(3+2*p)*x^2),x, algorithm="maxima")

[Out]

(2*c*f^2*(p + 1)*x^3 + c*e*f*p*x^2 - c*d*e*(p + 2) - (e^2*(p + 2) - 2*d*f*(p + 1))*c*x)*(f*x^2 + e*x + d)^p/(p
 + 1)

________________________________________________________________________________________

mupad [B]  time = 4.39, size = 78, normalized size = 1.70 \[ {\left (f\,x^2+e\,x+d\right )}^p\,\left (2\,c\,f^2\,x^3+\frac {c\,x\,\left (2\,d\,f-e^2\,p-2\,e^2+2\,d\,f\,p\right )}{p+1}-\frac {c\,d\,e\,\left (p+2\right )}{p+1}+\frac {c\,e\,f\,p\,x^2}{p+1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(d + e*x + f*x^2)^p*(2*c*e^2 - 2*c*d*f + c*e^2*p - 2*c*f^2*x^2*(2*p + 3)),x)

[Out]

(d + e*x + f*x^2)^p*(2*c*f^2*x^3 + (c*x*(2*d*f - e^2*p - 2*e^2 + 2*d*f*p))/(p + 1) - (c*d*e*(p + 2))/(p + 1) +
 (c*e*f*p*x^2)/(p + 1))

________________________________________________________________________________________

sympy [A]  time = 173.95, size = 280, normalized size = 6.09 \[ \begin {cases} - \frac {c d e p \left (d + e x + f x^{2}\right )^{p}}{p + 1} - \frac {2 c d e \left (d + e x + f x^{2}\right )^{p}}{p + 1} + \frac {2 c d f p x \left (d + e x + f x^{2}\right )^{p}}{p + 1} + \frac {2 c d f x \left (d + e x + f x^{2}\right )^{p}}{p + 1} - \frac {c e^{2} p x \left (d + e x + f x^{2}\right )^{p}}{p + 1} - \frac {2 c e^{2} x \left (d + e x + f x^{2}\right )^{p}}{p + 1} + \frac {c e f p x^{2} \left (d + e x + f x^{2}\right )^{p}}{p + 1} + \frac {2 c f^{2} p x^{3} \left (d + e x + f x^{2}\right )^{p}}{p + 1} + \frac {2 c f^{2} x^{3} \left (d + e x + f x^{2}\right )^{p}}{p + 1} & \text {for}\: p \neq -1 \\- c e \log {\left (\frac {e}{2 f} + x - \frac {\sqrt {- 4 d f + e^{2}}}{2 f} \right )} - c e \log {\left (\frac {e}{2 f} + x + \frac {\sqrt {- 4 d f + e^{2}}}{2 f} \right )} + 2 c f x & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**2+e*x+d)**p*(-2*c*e**2+2*c*d*f-c*e**2*p+2*c*f**2*(3+2*p)*x**2),x)

[Out]

Piecewise((-c*d*e*p*(d + e*x + f*x**2)**p/(p + 1) - 2*c*d*e*(d + e*x + f*x**2)**p/(p + 1) + 2*c*d*f*p*x*(d + e
*x + f*x**2)**p/(p + 1) + 2*c*d*f*x*(d + e*x + f*x**2)**p/(p + 1) - c*e**2*p*x*(d + e*x + f*x**2)**p/(p + 1) -
 2*c*e**2*x*(d + e*x + f*x**2)**p/(p + 1) + c*e*f*p*x**2*(d + e*x + f*x**2)**p/(p + 1) + 2*c*f**2*p*x**3*(d +
e*x + f*x**2)**p/(p + 1) + 2*c*f**2*x**3*(d + e*x + f*x**2)**p/(p + 1), Ne(p, -1)), (-c*e*log(e/(2*f) + x - sq
rt(-4*d*f + e**2)/(2*f)) - c*e*log(e/(2*f) + x + sqrt(-4*d*f + e**2)/(2*f)) + 2*c*f*x, True))

________________________________________________________________________________________